<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <link rel="stylesheet" href="/css/style1.css" th:href="@{/css/style1.css}">
  <title>福建农林大学资源与环境学院空间信息与数字技术技能考核</title>
</head>
<body background="/image/image3.jpg">
  <div class="login-container" bac>
    <div class="right-container">
      <div class="actoin-container">
        <span onclick="rand()">开始抽签</span>
      </div>
    </div>
  </div>
  <script src="/js/jquery.min.js"></script>
  <script th:inline="javascript">
    var sno=[[${sno}]];
    function rand(){
      $.ajax({
        url:"/check/"+sno,
        dataType:"json",
        type:"post",
        success:function (data) {
          if(data==true){
            alert("您已经抽过签了哦！");
          }else{
            location.href="/random";
          }
        }
      })
    }
  </script>
</body>
</html>